<?php require_once('../Connections/miportal.php'); 
mysql_query("SET NAMES 'utf8'");
setlocale(LC_MONETARY, 'en_US');?>
<?php

$id_obj=-1;
if(isset($_GET['var'])){
	$id_obj=base64_decode($_GET['var'])-261;
}
if($id_obj!=-1){
mysql_select_db($database_miportal, $miportal);
$query_rs_donativos ="SELECT * FROM `cor_donativo_empresa` WHERE `id_cor_empresa_beneficiada`=$id_obj";
$rs_query = mysql_query($query_rs_donativos, $miportal) or die(mysql_error());
$row_rs_donativos = mysql_fetch_assoc($rs_query);
$totalRows_rs_donativos = mysql_num_rows($rs_query);
}
?>
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximun-scale=1">
<title>FUNDACIÓN EDUCACIÓN SUPERIOR-EMPRESA</title>
<!--Hoja de estilo principal-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="../css/menu.css"><!--Pemanggilan gambar favicon-->
<link rel="stylesheet" type="text/css" href="../css/mos-style.css">
 <!--pemanggilan file css-->
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">

</head>

<body >
 
 <header>
       
</header>
  <h2 align="left" style="margin-left:10px; color:#00A4B1;">Número de donativos registrados en esta convocatoria: <?php print $totalRows_rs_donativos?> </h2>
  
  <table width="720" border="1" cellspacing="0" cellpadding="0" style="margin-left:10px">
    <tr>
      <th class="data" scope="col">NO.</th>
      <th class="data" scope="col">MONTO</th>
      <th class="data"  scope="col">FECHA</th>
      <th class="data" scope="col">DONATIVO DIGITAL</th>
      <th class="data" scope="col">COMPROBANTE FISCAL</th>
      <th class="data" scope="col">COMPROBANTE XML</th>
	  
    </tr>
  <?php for ($i=1;$i<=$totalRows_rs_donativos; $i++){?>

    <tr>
      <td class="data" Style="width:10px;"><?php echo $row_rs_donativos['gt_no_donativo']; ?></td>
      <td class="data" Style="width:50px;"><?php echo money_format('%.2n', $row_rs_donativos['gt_monto']); ?></td>
     <td class="data" Style="width:50px;"><?php echo $row_rs_donativos['gt_fecha_donativo']; ?></td>
	  <td class="data" Style="width:50px;"><a href="<?php echo $row_rs_donativos['url_donativo']; ?>" download="donativo.pdf"><?php echo (isset($row_rs_donativos['url_donativo'])?"DESCARGAR":"")?></a></td>
      <td class="data" Style="width:50px;"><a href="<?php echo $row_rs_donativos['url_comp_fiscal']; ?>" download="donativo.pdf"><?php echo (isset($row_rs_donativos['url_comp_fiscal'])?"DESCARGAR":"")?></a></td>
      <td class="data" Style="width:50px;"><a href="<?php echo $row_rs_donativos['url_comp_xml']; ?>" download="donativo.pdf"><?php echo (isset($row_rs_donativos['url_comp_xml'])?"DESCARGAR":"")?></a></td>
    </tr>
	<?php 
	$row_rs_donativos = mysql_fetch_assoc($rs_query);
  }?>
  </table>
  

  
 
</body>
</html>

